<template>
  <div class="summary">
    <span>全部任务({{ store.tasklist.length }})</span>
    <span>已完成({{ store.tasklist.length - store.unfinishedCount() }})</span>
    <span class="unfinished">未完成( {{store.unfinishedCount()}} )</span>
  </div>
</template>

<script setup>
import {useCounterStore} from '../stores/counter'
var store = useCounterStore( )

</script>
<style scoped>
.summary{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}
.summary span{
  background-color: rgb(33, 146, 216);
  color: white;
  text-align: center;
  line-height: 40px;
  border-radius: 5px;
  padding: 0 20px;
}
.summary span.unfinished{
  background-color: red;
}
</style>